// 对state进行包装和输出，获得state.singer
export const singer = state => state.singer
// state => state.singer 箭头函数的简写，state是一个function，return返回一个state.singer

// getter.js目录下：数据映射（类似于计算属性）
// 组件中可以通过mapgetters拿到这些数据
export const playing = state => state.playing

export const fullScreen = state => state.fullScreen

export const playlist = state => state.playlist

export const sequenceList = state => state.sequenceList

export const mode = state => state.mode

export const currentIndex = state => state.currentIndex

export const currentSong = (state) => {
  return state.playlist[state.currentIndex] || {}
}

export const disc = state => state.disc

export const topList = state => state.topList

export const searchHistory = state => state.searchHistory

export const playHistory = state => state.playHistory

export const favoriteList = state => state.favoriteList
